﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;

namespace DiscMaster.Web.Models
{

    [MetadataType(typeof(CourseDetail_MetaData))]
    public partial class CourseDetail
    {
    }

    internal class CourseDetail_MetaData
    {
        [ScaffoldColumn(false)]
        public System.Guid courseid { get; set; }

        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "Valid Email Address is required.")]
        [DisplayName("Email address")]
        [DataType(DataType.EmailAddress)]
        public string email { get; set; }

        [DisplayName("Address")]
        public string address { get; set; }

        [Required(ErrorMessage = "City is required.")]
        [DisplayName("City")]
        public string city { get; set; }

        [Required(ErrorMessage = "Country is required.")]
        [UIHint("Country")]
        [DisplayName("Country")]
        public string country { get; set; }

        [RegularExpression(@"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$", ErrorMessage = "Latitude is incorrect.")]
        [DisplayName("Latitude (decimal)")]
        public string latitude { get; set; }

        [RegularExpression(@"^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$", ErrorMessage = "Longitude is incorrect.")]
        [DisplayName("Longitude (decimal)")]
        public string longitude { get; set; }

        [RegularExpression(@"^.*yr.no.*.xml$", ErrorMessage= "YR.no weather url is incorrect.")]
        [DisplayName("YR.no weather link")]
        [DataType(DataType.Url)]
        public string yr_weather { get; set; }

        [DisplayName("Course website")]
        [DataType(DataType.Url)]
        public string website { get; set; }

        [DisplayName("Link to course map")]
        [DataType(DataType.Url)]
        public string maplink { get; set; }

        [DisplayName("Phone")]
        [DataType(DataType.PhoneNumber)]
        public string phone { get; set; }

        [DisplayName("Shop")]
        public bool shop { get; set; }

        [DisplayName("Restaurant")]
        public bool restaurant { get; set; }

        [DisplayName("Drivingrange")]
        public bool drivingrange { get; set; }

        [DisplayName("Course description")]
        [DataType(DataType.MultilineText)]
        public string description { get; set; }
    }

}
